<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('任务转移审批')" />
    <th:block th:include="include :: layout-latest-css" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-move-apprv">
            <input type="hidden" th:field="${move.mid}" name="mid">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">申请转移的任务：</label>
                    <div class="col-sm-9">
                        <input type="hidden" name="" class="form-control" th:value="${move.tid}"/>
                        <input type="text" name="" class="form-control" th:value="${move.info.target}" disabled="disabled"/>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">申请人：</label>
                <div class="col-sm-9">
                    <div class="col-sm-9">
                        <input type="text" name="" class="form-control" th:value="${move.aUser.userName}" disabled="disabled"/>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">移交人：</label>
                <div class="col-sm-9">
                    <input type="text" name="ologname" class="form-control" th:value="${move.oUser.userName}" disabled="disabled"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">转移原因：</label>
                <div class="col-sm-9">
                <textarea type="text" name="" class="form-control" placeholder="请输入文本"
                          th:field="${move.reason}"></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">是否同意：</label>
                <div class="col-sm-9">
                    <select class="form-control" name="opinion" >
                        <option>--请选择--</option>
                        <option value="0">同意</option>
                        <option value="1">不同意</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">详细意见：</label>
                <div class="col-sm-9">
                <textarea type="text" name="opiniondesc" class="form-control" placeholder="请输入详细意见"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer"/>
    <th:block th:include="include :: ztree-js"/>
<script type="text/javascript">
    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }
    function add() {
        var vals = $("#form-move-apprv").serialize();
        $.ajax({
            cache: true,
            type: "POST",
            url: ctx + "cms/mm/move/apprvMove",
            data: vals,
            async: false,
            error: function (request) {
                $.modal.alertError("系统错误");
            },
            success: function (data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>